//
//  QGDistributeLocationCell.m
//  GuQu
//
//  Created by HELIUM STAR on 15/5/14.
//  Copyright (c) 2015年 HELIUM STAR. All rights reserved.
//

#import "GQDistributeLocationCell.h"
#define kLocationMargin 20

@implementation GQDistributeLocationCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUpChildView];
    }
    return self;
}

- (void)setUpChildView
{
    CGFloat height = 16;
    
    UILabel *LocationTitle = [[UILabel alloc] init];
    LocationTitle.x = kLocationMargin;
    LocationTitle.y = (self.height - height * 2) / 2;
    LocationTitle.width = 250;
    LocationTitle.height = height;
    LocationTitle.font = [UIFont systemFontOfSize:14];
    LocationTitle.text = @"百大花园停车场";
    [self addSubview:LocationTitle];
    
    UILabel *descTitle = [[UILabel alloc] init];
    descTitle.x = kLocationMargin;
    descTitle.y = CGRectGetMaxY(LocationTitle.frame);
    descTitle.width = 250;
    descTitle.height = height;
    descTitle.font = [UIFont systemFontOfSize:10];
    descTitle.text = @"湖墅南路103号百大花园";
    [self addSubview:descTitle];
    
    CGFloat disWidth = 50;
    UILabel *distanceCount = [[UILabel alloc] init];
    distanceCount.x = self.width - kLocationMargin - disWidth;
    distanceCount.y = (self.height - height) / 2;
    distanceCount.width = disWidth;
    distanceCount.height = height;
    distanceCount.text = @"13m";
    distanceCount.font = [UIFont systemFontOfSize:14];
    distanceCount.textAlignment = NSTextAlignmentRight;
    [self addSubview:distanceCount];
}

@end
